Skip to content

Conversation

@avertin
Copy link
Contributor

@avertin avertin commented Feb 4, 2021

This library wraps all items that it renders in a TouchableOpacity. This is a problem if you want to use your own custom Touchable component. With the current implementation, the items are be double wrapped in Touchable components so the custom Touchable component never gets press events.

This change adds a new prop called dontWrapItems. If this is set to true, then the library will not wrap the items in a Touchable component and instead expect the renderItem component to handle the wrapping itself. To get everything to wire up, the library will need to pass delayLongPress, onPressOut, and onPressOut to the custom Touchable via a callback in renderItem.

If the maintainer is onboard with this change, I am happy to update the readme with this info as well.

Originally written by @aarondail

Also requested by @sirajalam049 - issue #109

@avertin avertin force-pushed the avertin/customRenderItem branch from d67c8c2 to 3b21b74 Compare February 4, 2021 23:25
@avertin avertin force-pushed the avertin/customRenderItem branch from 3b21b74 to 8eecf96 Compare February 4, 2021 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant